package com.sponge.result;

import com.sponge.constant.ErrorCode;
import com.sponge.constant.GlobalConstant;

import java.util.Date;
import java.util.List;

public class ServiceResultList<T> extends ServiceResult<ResultList<T>> {

    public ServiceResultList() {
    }

    public ServiceResultList(Integer status, String message, Date timestamp, ResultList<T> data) {
        super(status, message, timestamp, data);
    }

    public ServiceResultList(List<T> resultList,Integer currentPage, Integer pageSize){
        this(ErrorCode.NO_ERROR, GlobalConstant.SUCCESS,new Date(),new ResultList<>(resultList,currentPage,pageSize));
    }
}
